//给订单表插入一条数据
function orderInsert({
    data,success
}){
    wx.request({
      url: 'http://122.112.245.197:5000/post/order',
      method:"POST",
      data,
      success: (res) => {
        success(res)
    }
    })
}
//删除订单表中的一条数据
function orderDelete({
    data,success
}){
    wx.request({
      url: 'http://122.112.245.197:5000/delete/order',
      method:"POST",
      data,
      success: (res) => {
        success(res)
    }
    })
}
//商品收藏删除一条数据
function collectionDelete({
    data,success
}){
    wx.request({
      url: 'http://122.112.245.197:5000/delete/collection',
      method:"POST",
      data,
      success: (res) => {
        success(res)
    }
    })
}
//商品收藏增加一条数据
function collectionInsert({
    data,success
}){
    wx.request({
      url: 'http://122.112.245.197:5000/post/collection',
      method:"POST",
      data,
      success: (res) => {
        success(res)
    }
    })
}
//user表增加一条数据
function userInsert({
    data,success
}){
    wx.request({
      url: 'http://122.112.245.197:5000/post/user',
      method:"POST",
      data,
      success: (res) => {
        success(res)
    }
    })
}
function cartInsert({
    data,success
}){
    wx.request({
      url: 'http://122.112.245.197:5000/post/cart',
      method:"POST",
      data,
      success: (res) => {
        success(res)
    }
    })
}
function cartDelete({
    data,success
}){
    wx.request({
      url: 'http://122.112.245.197:5000/delete/cart',
      method:"POST",
      data,
      success: (res) => {
        success(res)
    }
    })
}
module.exports={
    orderInsert,
    orderDelete,
    collectionDelete,
    collectionInsert,
    userInsert,
    cartDelete,
    cartInsert
}
